package com.mdd.service.pay;

import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.domain.AlipayTradeCloseModel;
import com.alipay.api.domain.AlipayTradePayModel;
import com.alipay.api.domain.AlipayTradeQueryModel;
import com.alipay.api.response.AlipayTradeCloseResponse;
import com.alipay.api.response.AlipayTradePayResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;
/**
 * 预授权操作
 * <p>
 * {@code @Description}
 * @Author 幻速
 * {@code @Date} 2023/10/30 17:40
 **/
public interface AlipayAuthTradeService {
    /**
     * 预授权金额交易
     * @param alipayTradePayModel 预授权参数
     * @return AlipayTradePayResponse
     */
    AlipayTradePayResponse tradePay(AlipayClient alipayClient, AlipayTradePayModel alipayTradePayModel) throws AlipayApiException;

    /**
     * 预授权金额交易关闭
     * @param tradeCloseModel 关闭预授权参数
     * @return AlipayTradeCloseResponse
     */
    AlipayTradeCloseResponse tradeClose(AlipayClient alipayClient,AlipayTradeCloseModel tradeCloseModel, String notifyUrl) throws AlipayApiException;

    /**
     * 统一收单交易查询
     * @return AlipayTradeQueryResponse
     */
    AlipayTradeQueryResponse tradeQuery(AlipayClient alipayClient, AlipayTradeQueryModel tradeQueryModel, String notifyUrl) throws AlipayApiException;
}
